<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Jetson Inference: jetson-utils/Socket.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NVLogo_2D.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Jetson Inference
   </div>
   <div id="projectbrief">DNN Vision Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('Socket_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Socket.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="Socket_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * copy of this software and associated documentation files (the &quot;Software&quot;),</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * to deal in the Software without restriction, including without limitation</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * the rights to use, copy, modify, merge, publish, distribute, sublicense,</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * and/or sell copies of the Software, and to permit persons to whom the</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * Software is furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be included in</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * all copies or substantial portions of the Software.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * DEALINGS IN THE SOFTWARE.</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef __NETWORK_SOCKET_H_</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define __NETWORK_SOCKET_H_</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;cstddef&gt;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="group__network.html#gaa78c7398fa81f7f62aa233159d4d8d97">   34</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="group__network.html#gaa78c7398fa81f7f62aa233159d4d8d97">SocketType</a></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;{</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="group__network.html#ggaa78c7398fa81f7f62aa233159d4d8d97a180747545a72ff6d0fd0569e781aefd5">   39</a></span>&#160;        <a class="code" href="group__network.html#ggaa78c7398fa81f7f62aa233159d4d8d97a180747545a72ff6d0fd0569e781aefd5">SOCKET_UDP</a>  = 0,</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="group__network.html#ggaa78c7398fa81f7f62aa233159d4d8d97a2843397fd39bd96681bca78a8aa03096">   44</a></span>&#160;        <a class="code" href="group__network.html#ggaa78c7398fa81f7f62aa233159d4d8d97a2843397fd39bd96681bca78a8aa03096">SOCKET_TCP</a>  = 1</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;};</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="Socket_8h.html#aff78e91b6eed5ac391a5de7b6e62311e">   48</a></span>&#160;<span class="preprocessor">#define IP_ANY                  0x00000000</span></div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="Socket_8h.html#a35513f0b657dc418e4108dec538299ff">   49</a></span>&#160;<span class="preprocessor">#define IP_BROADCAST    0xFFFFFFFF</span></div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="Socket_8h.html#a64a65b271e90777a9531f8b34ebcdd51">   50</a></span>&#160;<span class="preprocessor">#define IP_LOOPBACK     0x7F000001</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classSocket.html">   63</a></span>&#160;<span class="keyword">class </span><a class="code" href="classSocket.html">Socket</a></div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;{</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <span class="keyword">static</span> <a class="code" href="classSocket.html">Socket</a>* <a class="code" href="classSocket.html#a400f9fdf31e5d6738fcb33f7dd6464a3">Create</a>( <a class="code" href="group__network.html#gaa78c7398fa81f7f62aa233159d4d8d97">SocketType</a> type );</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <a class="code" href="classSocket.html#aeac4eb6379a543d38ed88977d3b6630a">~Socket</a>();</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classSocket.html#ae3fb80aa2f7ab74d371fe045bc1312ee">Accept</a>( uint64_t timeout=0 );      </div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classSocket.html#a3935a15fa982064c2cb35996a2d6ef3d">Bind</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* localIP, uint16_t port );</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classSocket.html#a3935a15fa982064c2cb35996a2d6ef3d">Bind</a>( uint32_t localIP, uint16_t port );</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classSocket.html#a3935a15fa982064c2cb35996a2d6ef3d">Bind</a>( uint16_t port=0 );</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classSocket.html#ae52ee0bd9db277eee9324ed8da312bc7">Connect</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* remoteIP, uint16_t port );</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classSocket.html#ae52ee0bd9db277eee9324ed8da312bc7">Connect</a>( uint32_t remoteIP, uint16_t port );</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        <span class="keywordtype">size_t</span> <a class="code" href="classSocket.html#a30b5c0d94e1477859a1b05ce9cd2bedf">Recieve</a>( uint8_t* buffer, <span class="keywordtype">size_t</span> size, uint32_t* remoteIP=NULL, uint16_t* remotePort=NULL );</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        <span class="keywordtype">size_t</span> <a class="code" href="classSocket.html#a30b5c0d94e1477859a1b05ce9cd2bedf">Recieve</a>( uint8_t* buffer, <span class="keywordtype">size_t</span> size, uint32_t* remoteIP, uint16_t* remotePort, uint32_t* localIP );</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        </div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classSocket.html#a899ae7dea24300c0c11ffc908f428f76">Send</a>( <span class="keywordtype">void</span>* buffer, <span class="keywordtype">size_t</span> size, uint32_t remoteIP, uint16_t remotePort );</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        </div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classSocket.html#a74faf2bdb3116dc69164549465bfb638">SetRecieveTimeout</a>( uint64_t timeout );</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        </div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classSocket.html#a453d33c92c88a15b0d93601ef9f067aa">SetBufferSize</a>( <span class="keywordtype">size_t</span> size );</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classSocket.html#a90ff068da1fa6e1a28a014adca9efd74">EnableJumboBuffer</a>();</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="classSocket.html#af8e832813b2d414478b83e898cd88e30">  160</a></span>&#160;        <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classSocket.html#af8e832813b2d414478b83e898cd88e30">GetFD</a>()<span class="keyword"> const                                                                                        </span>{ <span class="keywordflow">return</span> mSock; }</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="classSocket.html#a7c5d363579140822d7477b21df0ca1e7">  165</a></span>&#160;        <span class="keyword">inline</span> <a class="code" href="group__network.html#gaa78c7398fa81f7f62aa233159d4d8d97">SocketType</a> <a class="code" href="classSocket.html#a7c5d363579140822d7477b21df0ca1e7">GetType</a>()<span class="keyword"> const                                                                       </span>{ <span class="keywordflow">return</span> mType; }</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classSocket.html#a2a1a0827f962d665cbcd8fe363c2f411">PrintIP</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordtype">size_t</span> <a class="code" href="classSocket.html#a4e9d1c14216315b46e2ab531735eec45">GetMTU</a>();</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        </div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        </div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        <a class="code" href="classSocket.html">Socket</a>( <a class="code" href="group__network.html#gaa78c7398fa81f7f62aa233159d4d8d97">SocketType</a> type );</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        <span class="keywordtype">bool</span> Init();</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        <span class="keywordtype">int</span>        mSock;</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        <a class="code" href="group__network.html#gaa78c7398fa81f7f62aa233159d4d8d97">SocketType</a> mType;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="keywordtype">bool</span>       mListening;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        <span class="keywordtype">bool</span>       mPktInfoEnabled;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        <span class="keywordtype">bool</span>       mBroadcastEnabled;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        </div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;        uint32_t   mLocalIP;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        uint16_t   mLocalPort;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        uint32_t   mRemoteIP;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        uint16_t   mRemotePort; </div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;};</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="classSocket_html"><div class="ttname"><a href="classSocket.html">Socket</a></div><div class="ttdoc">The Socket class provides TCP or UDP ethernet networking. </div><div class="ttdef"><b>Definition:</b> Socket.h:63</div></div>
<div class="ttc" id="classSocket_html_a90ff068da1fa6e1a28a014adca9efd74"><div class="ttname"><a href="classSocket.html#a90ff068da1fa6e1a28a014adca9efd74">Socket::EnableJumboBuffer</a></div><div class="ttdeci">bool EnableJumboBuffer()</div><div class="ttdoc">Enable jumbo buffer. </div></div>
<div class="ttc" id="classSocket_html_a2a1a0827f962d665cbcd8fe363c2f411"><div class="ttname"><a href="classSocket.html#a2a1a0827f962d665cbcd8fe363c2f411">Socket::PrintIP</a></div><div class="ttdeci">void PrintIP() const</div><div class="ttdoc">PrintIP. </div></div>
<div class="ttc" id="classSocket_html_a30b5c0d94e1477859a1b05ce9cd2bedf"><div class="ttname"><a href="classSocket.html#a30b5c0d94e1477859a1b05ce9cd2bedf">Socket::Recieve</a></div><div class="ttdeci">size_t Recieve(uint8_t *buffer, size_t size, uint32_t *remoteIP=NULL, uint16_t *remotePort=NULL)</div><div class="ttdoc">Wait for a packet to be recieved and dump it into the user-supplied buffer. </div></div>
<div class="ttc" id="group__network_html_ggaa78c7398fa81f7f62aa233159d4d8d97a2843397fd39bd96681bca78a8aa03096"><div class="ttname"><a href="group__network.html#ggaa78c7398fa81f7f62aa233159d4d8d97a2843397fd39bd96681bca78a8aa03096">SOCKET_TCP</a></div><div class="ttdoc">flag indicating TCP virtual circuit service (SOCK_STREAM) </div><div class="ttdef"><b>Definition:</b> Socket.h:44</div></div>
<div class="ttc" id="group__network_html_gaa78c7398fa81f7f62aa233159d4d8d97"><div class="ttname"><a href="group__network.html#gaa78c7398fa81f7f62aa233159d4d8d97">SocketType</a></div><div class="ttdeci">SocketType</div><div class="ttdoc">TCP/UDP enumeration. </div><div class="ttdef"><b>Definition:</b> Socket.h:34</div></div>
<div class="ttc" id="classSocket_html_a3935a15fa982064c2cb35996a2d6ef3d"><div class="ttname"><a href="classSocket.html#a3935a15fa982064c2cb35996a2d6ef3d">Socket::Bind</a></div><div class="ttdeci">bool Bind(const char *localIP, uint16_t port)</div><div class="ttdoc">Bind the socket to a local host IP address and port. </div></div>
<div class="ttc" id="classSocket_html_a899ae7dea24300c0c11ffc908f428f76"><div class="ttname"><a href="classSocket.html#a899ae7dea24300c0c11ffc908f428f76">Socket::Send</a></div><div class="ttdeci">bool Send(void *buffer, size_t size, uint32_t remoteIP, uint16_t remotePort)</div><div class="ttdoc">Send message to remote host. </div></div>
<div class="ttc" id="classSocket_html_a400f9fdf31e5d6738fcb33f7dd6464a3"><div class="ttname"><a href="classSocket.html#a400f9fdf31e5d6738fcb33f7dd6464a3">Socket::Create</a></div><div class="ttdeci">static Socket * Create(SocketType type)</div><div class="ttdoc">Create. </div></div>
<div class="ttc" id="classSocket_html_aeac4eb6379a543d38ed88977d3b6630a"><div class="ttname"><a href="classSocket.html#aeac4eb6379a543d38ed88977d3b6630a">Socket::~Socket</a></div><div class="ttdeci">~Socket()</div><div class="ttdoc">Destructor. </div></div>
<div class="ttc" id="classSocket_html_a453d33c92c88a15b0d93601ef9f067aa"><div class="ttname"><a href="classSocket.html#a453d33c92c88a15b0d93601ef9f067aa">Socket::SetBufferSize</a></div><div class="ttdeci">bool SetBufferSize(size_t size)</div><div class="ttdoc">Set the rx/tx buffer sizes. </div></div>
<div class="ttc" id="classSocket_html_a7c5d363579140822d7477b21df0ca1e7"><div class="ttname"><a href="classSocket.html#a7c5d363579140822d7477b21df0ca1e7">Socket::GetType</a></div><div class="ttdeci">SocketType GetType() const</div><div class="ttdoc">GetType. </div><div class="ttdef"><b>Definition:</b> Socket.h:165</div></div>
<div class="ttc" id="classSocket_html_af8e832813b2d414478b83e898cd88e30"><div class="ttname"><a href="classSocket.html#af8e832813b2d414478b83e898cd88e30">Socket::GetFD</a></div><div class="ttdeci">int GetFD() const</div><div class="ttdoc">Retrieve the socket&amp;#39;s file descriptor. </div><div class="ttdef"><b>Definition:</b> Socket.h:160</div></div>
<div class="ttc" id="classSocket_html_a74faf2bdb3116dc69164549465bfb638"><div class="ttname"><a href="classSocket.html#a74faf2bdb3116dc69164549465bfb638">Socket::SetRecieveTimeout</a></div><div class="ttdeci">bool SetRecieveTimeout(uint64_t timeout)</div><div class="ttdoc">Set Receive() timeout (in microseconds). </div></div>
<div class="ttc" id="group__network_html_ggaa78c7398fa81f7f62aa233159d4d8d97a180747545a72ff6d0fd0569e781aefd5"><div class="ttname"><a href="group__network.html#ggaa78c7398fa81f7f62aa233159d4d8d97a180747545a72ff6d0fd0569e781aefd5">SOCKET_UDP</a></div><div class="ttdoc">flag indicating UDP datagram service (SOCK_DGRAM) </div><div class="ttdef"><b>Definition:</b> Socket.h:39</div></div>
<div class="ttc" id="classSocket_html_ae52ee0bd9db277eee9324ed8da312bc7"><div class="ttname"><a href="classSocket.html#ae52ee0bd9db277eee9324ed8da312bc7">Socket::Connect</a></div><div class="ttdeci">bool Connect(const char *remoteIP, uint16_t port)</div><div class="ttdoc">Connect to a listening server (TCP only). </div></div>
<div class="ttc" id="classSocket_html_ae3fb80aa2f7ab74d371fe045bc1312ee"><div class="ttname"><a href="classSocket.html#ae3fb80aa2f7ab74d371fe045bc1312ee">Socket::Accept</a></div><div class="ttdeci">bool Accept(uint64_t timeout=0)</div><div class="ttdoc">Accept incoming connections (TCP only). </div></div>
<div class="ttc" id="classSocket_html_a4e9d1c14216315b46e2ab531735eec45"><div class="ttname"><a href="classSocket.html#a4e9d1c14216315b46e2ab531735eec45">Socket::GetMTU</a></div><div class="ttdeci">size_t GetMTU()</div><div class="ttdoc">Retrieve the MTU (in bytes). </div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_54a0acf6da04fe2ed9410b4c6369bc5d.html">jetson-utils</a></li><li class="navelem"><a class="el" href="Socket_8h.html">Socket.h</a></li>
    <li class="footer">Generated on Tue Jul 14 2020 21:59:34 for Jetson Inference by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
